import 'dart:typed_data';

///微信授权-分享-支付-QQ授权-分享 所需要的所有参数
class WXSdkParamsMap {
  // 微信开发平台的ID
  String? appId;

  // iOS平台需要Universal Links
  String? iOSUniversalLinks;

  // 应用授权作用域
  String? scope;

  // 分享的内容
  String? text;

  // 微信(好友  0/朋友圈 1)
  String? targetScene;

  // 图片的url
  String? imageUrl;

  // 内存图片
  Uint8List? imageData;

  // 缩略图
  String? thumbnail;

  // 音乐的URL地址
  String? musicUrl;

  // 音乐标题
  String? musicTitle;

  // 音乐描述
  String? musicDescription;

  // 视频的URL地址
  String? videoUrl;

  // 视频标题
  String? videoTitle;

  // 视频描述
  String? videoDescription;

  // 网页的URL地址
  String? webPageUrl;

  // 网页标题
  String? webPageTitle;

  // 网页描述
  String? webPageDescription;

  // 小程序封面图片的URL地址
  String? miniProgramWebPageUrl;

  // 小程序消息title
  String? miniProgramWebPageTitle;

  // 小程序消息desc
  String? miniProgramWebPageDescription;

  // 小程序原始id
  String? miniProgramId;

  // 小程序页面路径
  String? miniProgramPath;

  // 小程序新版本的预览图二进制数据
  String? miniProgramHdImageData;

  ///微信支付分配的商户号
  String? payPartnerId;

  ///预支付交易会话ID
  String? payPrepayId;

  ///随机字符串
  String? payNonceStr;

  ///时间戳
  String? payTimeStamp;

  ///暂填写固定值Sign=WXPay
  String? payPackageValue;

  ///签名
  String? paySign;

  WXSdkParamsMap(
      {this.appId,
      this.iOSUniversalLinks,
      this.scope,
      this.text,
      this.targetScene,
      this.imageUrl,
      this.imageData,
      this.thumbnail,
      this.musicUrl,
      this.musicTitle,
      this.musicDescription,
      this.videoUrl,
      this.videoTitle,
      this.videoDescription,
      this.webPageUrl,
      this.webPageTitle,
      this.webPageDescription,
      this.miniProgramWebPageUrl,
      this.miniProgramWebPageTitle,
      this.miniProgramWebPageDescription,
      this.miniProgramId,
      this.miniProgramPath,
      this.miniProgramHdImageData,
      this.payPartnerId,
      this.payPrepayId,
      this.payNonceStr,
      this.payTimeStamp,
      this.payPackageValue,
      this.paySign});

  WXSdkParamsMap.fromMap(Map<String, dynamic> data) {
    this.appId = data["appid"];
    this.iOSUniversalLinks = data["iOSUniversalLinks"];
    this.scope = data["scope"];
    this.text = data["text"];
    this.targetScene = data["targetScene"];
    this.imageUrl = data["imageUrl"];
    this.imageData = data["imageData"];
    this.thumbnail = data["thumbnail"];
    this.musicUrl = data["musicUrl"];
    this.musicTitle = data["musicTitle"];
    this.musicDescription = data["musicDescription"];
    this.videoUrl = data["videoUrl"];
    this.videoTitle = data["videoTitle"];
    this.videoDescription = data["videoDescription"];
    this.webPageUrl = data["webPageUrl"];
    this.webPageTitle = data["webPageTitle"];
    this.webPageDescription = data["webPageDescription"];
    this.miniProgramWebPageUrl = data["miniProgramWebPageUrl"];
    this.miniProgramWebPageTitle = data["miniProgramWebPageTitle"];
    this.miniProgramWebPageDescription = data["miniProgramWebPageDescription"];
    this.miniProgramId = data["miniProgramId"];
    this.miniProgramPath = data["miniProgramPath"];
    this.miniProgramHdImageData = data["miniProgramHdImageData"];
    this.payPartnerId = data["partnerid"];
    this.payPrepayId = data["prepayid"];
    this.payNonceStr = data["noncestr"];
    this.payTimeStamp = data["timestamp"];
    this.payPackageValue = data["package"];
    this.paySign = data["sign"];
  }

  Map<String, dynamic> toMap() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data["appid"] = appId;
    data["iOSUniversalLinks"] = iOSUniversalLinks;
    data["scope"] = scope;
    data["text"] = text;
    data["targetScene"] = targetScene;
    data["imageUrl"] = imageUrl;
    data["imageData"] = imageData;
    data["thumbnail"] = thumbnail;
    data["musicUrl"] = musicUrl;
    data["musicTitle"] = musicTitle;
    data["musicDescription"] = musicDescription;
    data["videoUrl"] = videoUrl;
    data["videoTitle"] = videoTitle;
    data["videoDescription"] = videoDescription;
    data["webPageUrl"] = webPageUrl;
    data["webPageTitle"] = webPageTitle;
    data["webPageDescription"] = webPageDescription;
    data["miniProgramWebPageUrl"] = miniProgramWebPageUrl;
    data["miniProgramWebPageTitle"] = miniProgramWebPageTitle;
    data["miniProgramWebPageDescription"] = miniProgramWebPageDescription;
    data["miniProgramId"] = miniProgramId;
    data["miniProgramPath"] = miniProgramPath;
    data["miniProgramHdImageData"] = miniProgramHdImageData;
    data["partnerid"] = payPartnerId;
    data["prepayid"] = payPrepayId;
    data["noncestr"] = payNonceStr;
    data["timestamp"] = payTimeStamp;
    data["package"] = payPackageValue;
    data["sign"] = paySign;
    return data;
  }
}
